import request from '@/utils/request'

export function getApiBlacklistPageList(params) {
  return request({
    url: '/api/app/blacklist/page-list',
    method: 'get',
    params
  })
}
export function inserApiBlack(data) {
  return request({
    url: '/api/app/blacklist/ed-blacklist',
    method: 'post',
    data
  })
}

export function deleteApiBlack(data) {
  let json = ``
  data.forEach((item, index) => {
    if (index == 0) {
      console.log(item.id)
      json += `?idlist=${item.id}`
    } else if (index > 0) {
      json += `&idlist=${item.id}`
    }
    console.log(json)
  });
  return request({
    url: '/api/app/blacklist/blacklist' + json,
    method: 'delete',
  })
}

